Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Support for Security Solution flyout #192934

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

davismcphee
Copy link
Contributor

Summary

WIP.

Checklist

For maintainers

… in useRootProfile, align root profile resolution in surrounding docs and single docs by using useRootProfile, and add getAppWrapper support to surrounding docs and single doc
@davismcphee davismcphee added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Project:OneDiscover Enrich Discover with contextual awareness labels Sep 13, 2024
@davismcphee davismcphee self-assigned this Sep 13, 2024
@elasticmachine
Copy link
Contributor

elasticmachine commented Sep 13, 2024

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 13, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #73 / context app context accessibility should give focus to the table Load link when Tab is pressed
  • [job] [logs] FTR Configs #73 / context app context accessibility should give focus to the table Load link when Tab is pressed
  • [job] [logs] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts / context app discover - context - back navigation should go back after loading
  • [job] [logs] FTR Configs #36 / context app discover - context - back navigation should go back after loading
  • [job] [logs] FTR Configs #69 / context app discover - context - back navigation should go back after loading
  • [job] [logs] FTR Configs #36 / context app discover - context - back navigation should go back after loading
  • [job] [logs] FTR Configs #69 / context app discover - context - back navigation should go back after loading
  • [job] [logs] x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts / context app discover - context - back navigation should go back after loading
  • [job] [logs] FTR Configs #30 / dashboard app - group 1 Changing field formatter to Url applied on discover
  • [job] [logs] FTR Configs #30 / dashboard app - group 1 Changing field formatter to Url applied on discover
  • [job] [logs] FTR Configs #71 / Discover discover async search navigation to context cleans the session
  • [job] [logs] FTR Configs #71 / Discover discover async search navigation to context cleans the session
  • [job] [logs] FTR Configs #65 / discover feature controls discover feature controls security when has privileges to read data views but no privileges to read index allows to access only via a permitted index alias
  • [job] [logs] FTR Configs #65 / discover feature controls discover feature controls security when has privileges to read data views but no privileges to read index allows to access only via a permitted index alias
  • [job] [logs] FTR Configs #4 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #81 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #81 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #4 / discover/ccs_compatible saved queries saved objects saved query selection should unselect saved query when navigating to a 'new'
  • [job] [logs] FTR Configs #52 / discover/classic discover doc table legacy expand a document row should show allow toggling columns from the expanded document
  • [job] [logs] FTR Configs #52 / discover/classic discover doc table legacy expand a document row should show allow toggling columns from the expanded document
  • [job] [logs] FTR Configs #11 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #62 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #91 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #11 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #62 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #91 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #23 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #23 / discover/context_awareness extension getRowIndicatorProvider should render log.level row indicators on Surrounding documents page
  • [job] [logs] FTR Configs #40 / discover/esql discover esql columns should render initial columns for non-transformational commands correctly
  • [job] [logs] FTR Configs #40 / discover/esql discover esql columns should render initial columns for non-transformational commands correctly
  • [job] [logs] FTR Configs #89 / discover/group1 discover doc accessibility should give focus to the first tab link when Tab is pressed
  • [job] [logs] FTR Configs #89 / discover/group1 discover doc accessibility should give focus to the first tab link when Tab is pressed
  • [job] [logs] x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group5.ts / discover/group2 discover data grid doc link should open the doc view of the selected document
  • [job] [logs] FTR Configs #67 / discover/group2 discover data grid doc link should open the doc view of the selected document
  • [job] [logs] FTR Configs #70 / discover/group2 discover data grid doc link should open the doc view of the selected document
  • [job] [logs] x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group5.ts / discover/group2 discover data grid doc link should open the doc view of the selected document
  • [job] [logs] FTR Configs #67 / discover/group2 discover data grid doc link should open the doc view of the selected document
  • [job] [logs] FTR Configs #70 / discover/group2 discover data grid doc link should open the doc view of the selected document
  • [job] [logs] FTR Configs #74 / discover/group2/data_grid1 discover data grid context tests should open the context view with the selected document as anchor
  • [job] [logs] FTR Configs #74 / discover/group2/data_grid1 discover data grid context tests should open the context view with the selected document as anchor
  • [job] [logs] FTR Configs #31 / discover/group2/data_grid2 discover data grid field tokens should not render field tokens when Document column is visible
  • [job] [logs] FTR Configs #31 / discover/group2/data_grid2 discover data grid field tokens should not render field tokens when Document column is visible
  • [job] [logs] FTR Configs #1 / discover/group2/data_grid3 discover data grid column widths should allow resetting column width in surrounding docs view
  • [job] [logs] FTR Configs #1 / discover/group2/data_grid3 discover data grid column widths should allow resetting column width in surrounding docs view
  • [job] [logs] FTR Configs #11 / discover/group3 discover request counts data view mode should send 2 search requests (documents + chart) on page load
  • [job] [logs] FTR Configs #11 / discover/group3 discover request counts data view mode should send 2 search requests (documents + chart) on page load
  • [job] [logs] FTR Configs #27 / discover/group4 discover uses fields API test displays _source viewer in doc viewer
  • [job] [logs] FTR Configs #27 / discover/group4 discover uses fields API test displays _source viewer in doc viewer
  • [job] [logs] FTR Configs #101 / discover/group7 discover integration with runtime fields editor allows adding custom description to existing fields
  • [job] [logs] FTR Configs #101 / discover/group7 discover integration with runtime fields editor allows adding custom description to existing fields
  • [job] [logs] Jest Tests #7 / useRootProfile should return rootProfileLoading as true when solutionNavId changes
  • [job] [logs] Jest Tests #7 / useRootProfile should return rootProfileLoading as true when solutionNavId changes

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 811.7KB 812.5KB +838.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
discover 47.5KB 47.4KB -35.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @davismcphee

);
};

export const getRenderDocViewerFlyout: DataSourceProfileProvider['profile']['getRenderDocViewerFlyout'] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or getDocViewerReplacement

export function DiscoverGridFlyout(props: DiscoverGridFlyoutProps) {
const getRenderDocViewerFlyout = useProfileAccessor('getRenderDocViewerFlyout', {
record: props.hit,
});
Copy link
Contributor

@logeekal logeekal Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @davismcphee for creating this extension point. Althought this extension point works to display our flyout. I am still working on that. What it does not do is gives any handle of onClose event to the users of extension point.

For example, consider 2 use cases:

  1. Users click close button of the flyout, in that case we want to effect the expand icon change in the Discover DataGrid as seen below:

  2. User clicking on expand button toggles the flyout but the extension point does not have access to know when user has clicked expand icon.

I think giving access to setExpandedDoc should be good enough and may also be more powerful than getRenderDocViewerFlyout.

What do you think?

profileId: 'example-root-profile',
isExperimental: true,
profile: {
getRenderAppWrapper: (PrevWrapper, params) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far this is working great. Still testing this. Will get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Project:OneDiscover Enrich Discover with contextual awareness release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants